<form name="formulario" method="post" action="sql/index">
	<div align="center">
	<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
		<tr><td class="separator" colspan="2">&nbsp;</td></tr>
		<tr>
			<td width="5%"><div align="right">&nbsp;SQL:&nbsp;&nbsp;</div></td>
			<td width="95%">
				&nbsp;&nbsp;&nbsp;<textarea name="sql" id="sql" rows="5" cols="100" class="textareadat" style="width: 900px;"><?php print $this->sql;?></textarea>
			</td>
		</tr>
		<tr><td class="separator" colspan="2">&nbsp;</td></tr>
		<?php if($this->sql!=""){ ?>
		<tr>
			<td colspan="2">
				<div style="width:980px;height: 300px;overflow:auto;">
				<table align="center" border="1" cellpadding="0" cellspacing="0" width="100%">
					<?php if(isset($this->campos)){ ?>					
					<tr>
						<?php foreach($this->campos as $indice => $valor) { ?>	
			  		<td align="center"><?php print $valor;?></td>
						<?php	} ?>
					</tr>
					<?php foreach($this->valores as $indice => $valor){ ?>
					<tr>
						<?php foreach($valor as $indice2 => $valor2){ ?>
						<td align="center"><?php print $valor2;?></td>
						<?php } ?>
					</tr>				
					<?php } ?>
					<?php }else{ ?>					
					<tr><td><?php print $this->resultado;?></td></tr>
					<?php } ?>
				</table>
				</div>
			</td>
		</tr>
		<?php } ?>
		<tr><td class="separator" colspan="2">&nbsp;</td></tr>
		<tr>
			<td align="center" colspan="2">
				<div align="center">
					<input type="submit" name="btnEjecutar" value="Ejecutar" class="boton" />
				</div>
			</td>
		</tr>
		<tr><td class="separator" colspan="2">&nbsp;</td></tr>
	</table>
	</div>
</form>
